I liked how clean my NexT theme looked, but then I’d see what people were doing with WordPress and start itching to change things up. Butterfly was the theme that finally got me to try. I installed it, went to generate the site, and my terminal filled with errors. So much for a quick theme change. Time to upgrade Hexo.

[toc]

How I upgraded the wrong thing

The advice I kept finding was to run this:

1
npm i hexo-cli -g

The command worked. That was what threw me. I’d upgraded the command-line tool on my machine, and the blog was still using the same Hexo package as before. I tried this from the project:

1
npm update

Then I ran hexo version. Still 3.9.0.

What finally worked on this blog

Eventually I found someone who’d run into the same thing. I started with the CLI again:

1
npm i hexo-cli -g

This time I also went through the blog’s dependencies. First I checked what was out of date:

1
2
npm install -g npm-check
npm-check

That took about a round of Honor of Kings. Next I ran the tool that let me choose newer versions:

1
2
npm install -g npm-upgrade
npm-upgrade

Another round of Honor of Kings. When the version prompts came up, I pressed Enter to take the defaults.

There was one last step: install the updates, both globally and for the project.

1
2
npm update -g
npm update --save

This time hexo version finally showed the version I’d been trying to install.